package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name = "MERCHANTFEEPOLICY")
public class MerchantFeePolicy implements java.io.Serializable {

	/**
	 * 持卡人商户交易折扣/手续费策略id
	 */
	private BigInteger mrchFeePolicyId;

	@Id
	@Column(name = "MRCHFEEPOLICYID", nullable = false)
	public BigInteger getMrchFeePolicyId() {
		return mrchFeePolicyId;
	}

	public void setMrchFeePolicyId(BigInteger mrchFeePolicyId) {
		this.mrchFeePolicyId = mrchFeePolicyId;
	}

	/**
	 * 商户NO
	 */
	private String merchantNo;

	@Column(name = "MERCHANTNO", nullable = false)
	public String getMerchantNo() {
		return merchantNo;
	}

	public void setMerchantNo(String merchantNo) {
		this.merchantNo = merchantNo;
	}

	/**
	 * 交易类型
	 */
	private String tranType;

	/**
	 * 0-消费
	 */
	public static final String TRANTYPE_CONSUME = "0";

	/**
	 * 1-充值
	 */
	public static final String TRANTYPE_DEPOSIT = "1";

	@Column(name = "TRANTYPE", nullable = false)
	public String getTranType() {
		return tranType;
	}

	public void setTranType(String tranType) {
		this.tranType = tranType;
	}

	/**
	 * 业务类型
	 */
	private String businessType;

	@Column(name = "BUSINESSTYPE", nullable = true)
	public String getBusinessType() {
		return businessType;
	}

	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}

	/**
	 * 商户分支机构号
	 */
	private String mrchBranchNo;

	@Column(name = "MRCHBRANCHNO", nullable = true)
	public String getMrchBranchNo() {
		return mrchBranchNo;
	}

	public void setMrchBranchNo(String mrchBranchNo) {
		this.mrchBranchNo = mrchBranchNo;
	}

	/**
	 * 卡面Id
	 */
	private BigInteger cardFaceId;

	@Column(name = "CARDFACEID", nullable = true)
	public BigInteger getCardFaceId() {
		return cardFaceId;
	}

	public void setCardFaceId(BigInteger cardFaceId) {
		this.cardFaceId = cardFaceId;
	}

	/**
	 * 卡种类ID
	 */
	private BigInteger cardClassicId;

	@Column(name = "CARDCLASSICID", nullable = true)
	public BigInteger getCardClassicId() {
		return cardClassicId;
	}

	public void setCardClassicId(BigInteger cardClassicId) {
		this.cardClassicId = cardClassicId;
	}

	/**
	 * 起始卡序号
	 */
	private String startCardSeqNo;

	@Column(name = "STARTCARDSEQNO", nullable = true)
	public String getStartCardSeqNo() {
		return startCardSeqNo;
	}

	public void setStartCardSeqNo(String startCardSeqNo) {
		this.startCardSeqNo = startCardSeqNo;
	}

	/**
	 * 终止卡序号
	 */
	private String endCardSeqNo;

	@Column(name = "ENDCARDSEQNO", nullable = true)
	public String getEndCardSeqNo() {
		return endCardSeqNo;
	}

	public void setEndCardSeqNo(String endCardSeqNo) {
		this.endCardSeqNo = endCardSeqNo;
	}

	/**
	 * 起始时间
	 */
	private Date startDate;

	@Column(name = "STARTDATE", nullable = true)
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	/**
	 * 终止时间
	 */
	private Date endDate;

	@Column(name = "ENDDATE", nullable = true)
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	/**
	 * 起始发生额
	 */
	private BigInteger startAmount;

	@Column(name = "STARTAMOUNT", nullable = false)
	public BigInteger getStartAmount() {
		return startAmount;
	}

	public void setStartAmount(BigInteger startAmount) {
		this.startAmount = startAmount;
	}

	/**
	 * 终止发生额
	 */
	private BigInteger endAmount;

	@Column(name = "ENDAMOUNT", nullable = false)
	public BigInteger getEndAmount() {
		return endAmount;
	}

	public void setEndAmount(BigInteger endAmount) {
		this.endAmount = endAmount;
	}

	/**
	 * 消费折扣
	 */
	private String feeType;

	/**
	 * 0 – 固定金额
	 */
	public final static String FEETYPE_FIX = "0";

	/**
	 * 1 – 按发生额比率收取
	 */
	public final static String FEETYPE_FEERATIO = "1";

	@Column(name = "FEETYPE", nullable = false)
	public String getFeeType() {
		return feeType;
	}

	public void setFeeType(String feeType) {
		this.feeType = feeType;
	}

	/**
	 * 收费比率
	 */
	private BigInteger fixRatio;

	@Column(name = "FIXRATIO", nullable = false)
	public BigInteger getFixRatio() {
		return fixRatio;
	}

	public void setFixRatio(BigInteger fixRatio) {
		this.fixRatio = fixRatio;
	}

	/**
	 * 固定金额
	 */
	private BigInteger fixFee;

	@Column(name = "FIXFEE", nullable = false)
	public BigInteger getFixFee() {
		return fixFee;
	}

	public void setFixFee(BigInteger fixFee) {
		this.fixFee = fixFee;
	}

	/**
	 * 状态
	 */
	private String status;

	/**
	 * 0-无效
	 */
	public final static String STATUS_INVALID = "0";

	/**
	 * 1-无效待审核
	 */
	public final static String STATUS_INVALID_WAIT_AUTH = "1";

	/**
	 * 2-生效
	 */
	public final static String STATUS_VALID = "2";

	/**
	 * 3-生效待审核
	 */
	public final static String STATUS_VALID_WAIT_AUTH = "3";
	
	/**
	 * 5-待审核
	 */
	public final static String STATUS_WAIT_AUTH = "5";

	@Column(name = "STATUS", nullable = false)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * 创建人
	 */
	private BigInteger createOperId;

	@Column(name = "CREATEOPERID", nullable = false)
	public BigInteger getCreateOperId() {
		return createOperId;
	}

	public void setCreateOperId(BigInteger createOperId) {
		this.createOperId = createOperId;
	}

	/**
	 * 创建时间
	 */
	private Date createTime;

	@Column(name = "CREATETIME", nullable = false)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * 审批人
	 */
	private BigInteger authOperId;

	@Column(name = "AUTHOPERID", nullable = true)
	public BigInteger getAuthOperId() {
		return authOperId;
	}

	public void setAuthOperId(BigInteger authOperId) {
		this.authOperId = authOperId;
	}

	/**
	 * 审批时间
	 */
	private Date authTime;

	@Column(name = "AUTHTIME", nullable = true)
	public Date getAuthTime() {
		return authTime;
	}

	public void setAuthTime(Date authTime) {
		this.authTime = authTime;
	}

	/**
	 * 备注
	 */
	private String remark;

	@Column(name = "REMARK", nullable = true)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}
